<template>
	<view style="height: 100vh; background-color: #FFFFFF;">
		<u-navbar title-color="#FFFFFF" height="48" back-icon-color="#FFFFFF" :border-bottom="false" :is-fixed="true" :title="'工单详情'"></u-navbar>
		<u-cell-group v-model="maintenanceRecordinfo">
			<u-cell-item :border-bottom="true" title="工单名称:" :value="maintenanceRecordinfo.name" :arrow="false"></u-cell-item>
			<u-cell-item :border-bottom="true" title="维保人员:" :value="maintenanceRecordinfo.designeeName" :arrow="false"></u-cell-item>
			<u-cell-item :border-bottom="true" title="业主名称:" :value="maintenanceRecordinfo.enterpriseName" :arrow="false"></u-cell-item>
			<u-cell-item :border-bottom="true" title="设备名称:" :value="maintenanceRecordinfo.equipmentName" :arrow="false"></u-cell-item>
			<u-cell-item :border-bottom="true" title="维保企业:" :value="maintenanceRecordinfo.manitenanceEnterpriseName" :arrow="false"></u-cell-item>
			<u-cell-item :border-bottom="true" title="工单状态:" :value="maintenanceRecordinfo.status | workOrderStatus" :arrow="false"></u-cell-item>
			<u-cell-item :border-bottom="true" title="整改时间:" :value="maintenanceRecordinfo.fireControlConfirmTime | dateFormat" :arrow="false"></u-cell-item>
			<u-button @click="falutRecordFeedback" type="primary" shape="square" size="medium" style="width: 49%;">提取需求</u-button>
			<u-button @click="rectificationTime" type="primary" shape="square" size="medium" style="width: 49%; float: right;">整改时间</u-button>
		</u-cell-group>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				maintenanceRecordinfo: {
					ucId:''
				},
				
			}
		},
		onLoad(e) {
			this.maintenanceRecordinfo.ucId=e.ucId
			console.log(e.ucId)
			this.ucId=e.ucId
		},
		onShow() {
			
			this.getInMaintenanceRecordInfo(this.ucId)
		},
		methods: {
			getInMaintenanceRecordInfo(val) {
				this.utils.request("/api/app/maintenanceRecord/getInMaintenanceRecordVo", {	ucId: val}, "post", "app", true).then(res => {
					console.log(res)
					this.maintenanceRecordinfo = res.data
				}).catch(error => {
					console.log(error)
				})
			},
			falutRecordFeedback(){
				console.log(this.maintenanceRecordinfo.ucId)
				uni.navigateTo({
					url:"/pages/index/workorder/information/feedback?ucId="+this.maintenanceRecordinfo.ucId
				})
			},
			rectificationTime(){
				uni.navigateTo({
					url:"/pages/index/workorder/information/rectificationTime?ucId="+this.maintenanceRecordinfo.ucId
				})
			}
		}
	}
</script>

<style>

</style>

